package com.caishi.lkx.user.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zzw.common.entity.impl.BaseIntEntity;
import com.zzw.common.service.model.NameModel;
import com.zzw.common.service.model.base.BaseTreeModel;
import lombok.*;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author by keray
 * date:2021/4/20 9:50 上午
 */

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("cu_position")
public class PositionModel extends BaseIntEntity<PositionModel> implements BaseTreeModel<PositionModel, Long> , NameModel<PositionModel, Long> {
    private String name;
    private String code;
    private Long parentId;

    @TableField(exist = false)
    private PositionModel parent;

    @TableField(exist = false)
    private List<PositionModel> children;

    @TableField(exist = false)
    private LocalDateTime expireTime;
}
